#include "Froce.h"

void SetEffect(char EffectType,unsigned char * Buffer)
{
    switch (EffectType)
    {
    case 1:// Usage ET Constant Force 0
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 1; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;

        // now, when the host issues a get_report, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.

        break;
    case 2:// Usage ET Ramp 1
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 2; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;

        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 3:// Usage ET Square 2
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 3; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;

        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 4:// Usage ET Sine 3
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 4; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;

        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 5:// Usage ET Triangle 4
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 5; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;

        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 6:// Usage ET Sawtooth Up 5
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 6; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;

        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 7:// Usage ET Sawtooth Down 6
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 7; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this, because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;
        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 8:// Usage ET Spring 7
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 8; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this  because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;
        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 9:// Usage ET Damper 8
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 9; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this , because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;
        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 10:// Usage ET Inertia 9
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 10; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this , because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;
        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 11:// Usage ET Friction 10
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 11; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this , because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;
        // now, when the host issues a get_report blah blah, i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    case 12:// Usage ET Custom Force Data 11 ! NOT SUPPORTED BY THIS DEVICE !
        Buffer[0] = 2; // 2= PID BLOCK LOAD REPORT
        Buffer[1] = 12; //0=i can't create effect, 1 = CONSTANT FORCE, index in the array = effect_block_index-1 : 0
        Buffer[2] = 1; // ok, i can load this , because i have already memory for it, and because : reasons
        Buffer[3] = 0xFF; // i have no ideea why i need this, however i have no more memory except for the effects already preallocated.
        Buffer[4] = 0xFF;
        // now, when the host issues a get_report , i send the pset_get_effect->PID_BLOCK_LOAD_REPORT.
        break;
    }
}
